<?php
session_start();
include('fungsi_admin.php');
if (!empty($_SESSION['user'])){
?>
<html>
<head><title>Daftar Berita</title></head>
<body>
<h2>Daftar Berita</h2>
<p>[ <a href="kategori_tambah.php">Tambah Kategori</a>] </p>
<form action="" method="post">
<table width="300px" border="1">
<tr>
<td>Kategori</td>
<td><input type="text" name="kategori"/></td>
<td><input type="submit" value="Tambah"/></td>
</tr>
<?php
} ?>
</table>
</form>
</body>
</html>
<?php
if(!empty($_POST)){
kategori_tambah($_POST['kategori']);
print_r($_POST);
}
?>